<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="css/base.css">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .form-control{
            width:800px;
        }
    </style>
</head>
<body>
    <nav class="navbar navbar-default nav-color" role="navigation">
        <div class="container-fluid">
          <div class="navbar-header">
            <a class="navbar-brand" href="#">后台管理</a>
          </div>
          <ul class="nav navbar-nav navbar-right">
            <li><a href="/"><span class="glyphicon glyphicon-user"></span> 主页</a></li>
            <li><a href="/loginOut"><span class="glyphicon glyphicon-log-in"></span> 退出登录</a></li>
          </ul>
        </div>
      </nav>
    <div class="container">
        <form class="form-horizontal" action="/doEdit" method="POST">
            <legend>修改数据</legend>
            <input type="hidden" name = "id" value="{{@data._id}}">
            <div class="form-group">
              <label for="name" class="col-sm-2 control-label">姓名</label>
              <div class="col-sm-10">
                <input type="text" name="name"value= "{{data.name}}"class="form-control" id="name" >
              </div>
            </div>
            <div class="form-group">
              <label for="avatar" class="col-sm-2 control-label">头像</label>
              <div class="col-sm-10">
                <input id="avatar" name="avatar" type="text" value="{{data.avatar}}" class="form-control">
              </div>
            </div>
            <div class="form-group">
                <label for="backgroundUrl" class="col-sm-2 control-label">背景</label>
                <div class="col-sm-10">
                    <input type="text" id="backgroundUrl" name="backgroundUrl" value="{{data.backgroundUrl}}"class="form-control">
                </div>
              </div>
              <div class="form-group">
                <label for="description" class="col-sm-2 control-label">介绍</label>
                <div class="col-sm-10">
                    <input type="text" id="description" name="description" value="{{data.description}}"class="form-control">
                </div>
              </div>
              <div class="form-group">
                <label for="motto" class="col-sm-2 control-label">名言</label>
                <div class="col-sm-10">
                    <input type="text" id="motto" name="motto" value="{{data.motto}}"class="form-control">
                </div>
              </div>
              <div class="form-group">
                <label for="site" class="col-sm-2 control-label">网址</label>
                <div class="col-sm-10">
                    <input type="text" id="site" name="site" value="{{data.site}}"class="form-control" >
                </div>
              </div>
              <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                  <button type="submit" class="btn btn-primary">修改</button>
                </div>
              </div>
          </form>      
    </div>
</body>
</html>